#include "mpu6050devicedef.h"
#include "lib/stringex.h"

MPU6050Result::MPU6050Result()
{

}

MPU6050Result::~MPU6050Result()
{
    
}

std::string MPU6050Result::ToString()
{    
    if(logEnableSimple)
    {
        return StringEx::Format("ok:%d euler:(%.2f, %.2f, %.2f)",
                                isOk,
                                pitch, rol, yaw);
    }
    else
    {
        return StringEx::Format("ok:%d euler:(%.2f, %.2f, %.2f) acc:(%d, %d, %d) gyr:(%d, %d, %d)",
                                isOk,
                                pitch, rol, yaw,
                                acc_x, acc_y, acc_z,
                                gyr_x, gyr_y, gyr_z);
    }
}
